fn main() {
    println!("=====作用域=====");
    let mut x = 1;
    {
        let y = 1;
        println!("x={}", x);
        println!("y={}", y);
    }

    println!("=====移动=====");
    {
        let s1 = String::from("hello");
        // s1 = s1 + " world";
        println!("s1={}", s1);

        let  s2 = s1;
        println!("s2={}", s2);

        // 克隆
        let s3 = s2.clone();
        println!("s3={}",s3);
        println!("s2={}",s2);
    }

    println!("=====复制=====");
    let mut a = 1;
    let mut b = a;


    println!("a={}", a);
    println!("b={}", b);


}
